package com.groupbuying.currency.producer.utils.currencyOperUtils;

import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Random;
import java.util.UUID;

/**
 * @anthor wenguoqiang
 * @date: 2019/01/09 15:52
 * @company 蒙泰互联网公司
 * @des
 **/
public class UuidUtils {

    public static String createUuid() {
        return UUID.randomUUID().toString().replaceAll("\\-", "");
    }


    public static String getPayOrderId() {
        SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMddHHmmssSSS");
        String newDate = sdf.format(new Date());
        String result = "";
        Random random = new Random();
        for (int i = 0; i < 11; i++) {
            result += random.nextInt(10);
        }

        return newDate + result;
    }


}
